import com.td.spring.beans.BeanPostProcessor;

/**
 * @author td
 * @date 2018/6/5
 */
public class BeanInitializeLogger implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws Exception {

        System.out.println("initialize bean  " + beanName + " start!");
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws Exception {
        System.out.println("initialize bean  " + beanName + " end!");
        return bean;
    }
}
